package comtest.mongodb.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDate;
import java.util.List;

/**
 * @author: yxzhang23
 * @time: 2021/5/11
 */
@Data
@Document("user")
@NoArgsConstructor
@AllArgsConstructor
public class User {

    private Integer id;
    private String  username;
    private Integer age;
    @JsonFormat(pattern = "yyyy-MM-DD", timezone = "GMT+8")
    private LocalDate   birthDay;
    private List<String>    likes;
    private List<Phone> phones;

}
